package com.qiaofang.applet.service.other.service;

import com.qiaofang.applet.common.base.BaseService;
import com.qiaofang.applet.service.other.domain.Assets;
import com.qiaofang.applet.service.other.domain.AssetsType;
import com.qiaofang.applet.service.other.service.dto.*;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @author daiyuxiang
 */
public interface AssetsService extends BaseService<Assets, String> {

    Page<AssetsDetailDto> getListForClient(AssetsQueryDto queryDto, Pageable pageable);

    /**
     *资讯列表查询
     * @param requestDto
     * @param pageable
     * @return
     */
    Page<AssetsDetailDto> findByParams(AssetsRequestDto requestDto, Pageable pageable);

    /**
     * 保存资讯
     * @param assets
     */
    void saveAssets(Assets assets);

    /**
     * 删除资讯
     * @param assetsId
     */
    void removeAssets(String assetsId);

    /**
     * 保存资讯类型
     * @param assetsType
     */
    void saveAssetsType(AssetsType assetsType);

    /**
     * 删除资讯类型
     * @param assetsTypeId
     */
    void removeAssetsType(String assetsTypeId);

    /**
     * 查询咨询类型
     * @param requestDto
     * @param pageable
     * @return
     */
    Page<AssetsTypeDto> findTypeByParams(AssetsTypeDto requestDto, Pageable pageable);

    /**
     * 查询所有的资讯类型
     * @param corporationCode
     * @return
     */
    List<AssetsTypeDto> findAllType(String corporationCode);

    /**
     * 首页咨询列表
     * @param cityCode
     * @return
     */
    List<List<AssetsDetailDto>> getIndexAssets(String cityCode, Pageable pageable);

    /**
     * 分享朋友圈二维码
     * @param id
     * @return
     */
    ShareAssetsDto shareAssets(String id);

    /**
     * 根据类型资讯类型ID查询资讯信息
     * @param id
     * @return
     */
    AssetsType findAssetsType(String id);

    /**
     * 获取咨询照片合集
     * @param id
     * @return
     */
    List<String> getAssetsPhotoLists(String id);
}
